package com.kystar.ledcontrol.recycleview.view;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;

import com.kystar.ledcontrol.recycleview.util.TLog;

/**
 * Created by peanut on 2018/05/31.
 */

public class MyViewPager extends ViewPager implements ScaleGestureDetector.OnScaleGestureListener {
    private static final String TAG = "MyViewpager";
    public MyViewPager(@NonNull Context context) {
        super(context);
    }

    public MyViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onScale(ScaleGestureDetector detector) {
        return false;
    }

    @Override
    public boolean onScaleBegin(ScaleGestureDetector detector) {
        return false;
    }

    @Override
    public void onScaleEnd(ScaleGestureDetector detector) {

    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        TLog.e(TAG,"onInterceptTouchEvent");
        return super.onInterceptTouchEvent(ev);
    }
}
